import matplotlib.pyplot as plt
import numpy as np
'''
squares=[1,4,9,16,25]
plt.plot(squares,linewidth=5)
plt.title('Squares Numbers',fontsize=24)
plt.xlabel('Value',fontsize=14)
plt.ylabel('Square of Value',fontsize=14)

#刻度标记的大小
plt.tick_params(axis='both',labelsize=14)
plt.show()

input_values=[1,2,3,4,5]
squares=[1,4,9,16,25]
plt.plot(input_values,squares,linewidth=5)
plt.plot()

t=np.arange(1,5,0.2)
plt.plot(t,t,'r--',t,t**2,'bs',t,t**3,'g^')
plt.show()

data={'a':np.arange(50),
      'c':np.random.randint(0,50,50),
      'd':np.random.randn(50)}
data['b']=data['a']+10*np.random.randn(50)
data['d']=np.abs(data['d'])*100
plt.scatter('a','b',c='c',s='d',data=data)
plt.xlabel('entry a')
plt.ylabel('entry b')
plt.show()

'''
#用分类变量绘图
names = ['group_a', 'group_b', 'group_c','groub_d']
values = [1, 10, 100,1000]

plt.figure(figsize=(9, 3))

plt.subplot(131)#plt.subplot(1,3,1)
plt.bar(names, values)
plt.subplot(132)
plt.scatter(names, values)
plt.subplot(133)
plt.plot(names, values)
plt.suptitle('Categorical Plotting')
plt.show()

np.c_()
